package org.atlantis.util;

import org.codehaus.jackson.map.ObjectMapper;

public class Printer {

	private static ObjectMapper mapper = new ObjectMapper();

	public static String fmtObject(Object obj) {
		String objStr = "";
		try {
			objStr = mapper.defaultPrettyPrintingWriter().writeValueAsString(obj);
		} catch (Exception e) {
		}
		String className = obj.getClass().getName();
		return String.format("Class : %s\n%s", className, objStr);
	}
}
